import React from 'react'
import { useSelector,useDispatch } from 'react-redux'
import { add } from '../../store/Num'
export default function App() {
  let dispatch = useDispatch()
  let num = useSelector((state)=>state.num)
  console.log(num)
  console.log(num)
  let tonum =()=>{
    dispatch(add(10))
    
  }
  return (
    <div>
      <button onClick={()=>{tonum()}}>num</button>
    </div>
  )
}
